1. Field of the Invention
The present invention relates generally to booting computers, and more particularly, to multi-tasking boot firmware for computers.
2. Description of the Related Art
In a personal computer (PC), the main processor (also referred to as the central processing unit (xe2x80x9cCPUxe2x80x9d) or simply xe2x80x9cthe processorxe2x80x9d) performs useful tasks by executing program code that is stored in memory. Most PC memory is volatile, i.e., the information stored in the memory is lost when the power is turned off. Therefore, most program code is stored on a nonvolatile storage device such as a fixed disk (i.e., xe2x80x9chard drivexe2x80x9d), and then copied into volatile memory such as dynamic random access memory (DRAM) after the PC is powered-up.
Most PCs also include a small amount of system firmware, which is program code that is stored in a nonvolatile memory device such as read-only memory (ROM). The main processor can run program code directly from ROM as soon as power is applied to the system. In some systems, the system firmware is copied from ROM to DRAM shortly after power-up because program code typically runs faster from DRAM.
The system firmware includes program code known as basic input/output service (BIOS) which performs low-level, hardware-specific tasks. BIOS insulates higher-level software such as the operating system and application programs from the low-level details required to utilize the hardware installed on the system.
The program code in BIOS is generally divided into two types: run time services; and boot code. The run time services are used when the operating system needs to access a hardware device, for example, to write data to a fixed disk. To perform the data transfer, the operating system calls a BIOS routine which handles the details of writing the data to the disk.
The BIOS boot code is used when the system is reset, which usually only happens when the system is powered-up. When a conventional PC is reset, it goes through a boot process to bring the system to a normal operating state. During a typical boot process, a power-on self-test (POST) is performed, hardware devices are configured and initialized, and devices requiring system resources are enumerated. Enumeration is a process in which resources such as memory space, interrupt channels, direct memory access (DMA) channels, and input/output ports are assigned to specific hardware devices. To keep track of these resources, they are listed in one or more resource tables.
In a conventional PC, all of the boot tasks described above are performed sequentially by the BIOS boot code. The BIOS boot code then passes control of the PC to the operating system, which performs some additional boot tasks before the system reaches its normal operating state. The complete boot process typically takes several minutes to complete.
To make personal computers more xe2x80x9cappliance-likexe2x80x9d, the boot time must be reduced significantly so that, even when the computer is off (or appears to be off), it can be powered-up and ready to use almost instantly. It must also be able to boot up quickly enough to respond to real world events such as answering a telephone or displaying new e-mail messages.
Another obstacle to making personal computers more appliance-like is the complexity of changing system hardware. Most PCs are open systems, which means that hardware can be added to or removed from the system. When hardware is added to a conventional PC, the user must manually input configuration information into the system to allow it to utilize the new hardware. This is an awkward and confusing process that requires significant knowledge of computer hardware.
Efforts to reduce the complexity of adding new hardware to a PC overlap with efforts to reduce the boot time of PCs because configuring hardware takes a significant portion of the boot time. For example, initiatives such as xe2x80x9cPlug and Playxe2x80x9d (or xe2x80x9cPnPxe2x80x9d) and xe2x80x9cOnNowxe2x80x9d, as described below, affect both the boot time of a PC and the procedure for adding new hardware.
Plug and Play is a system of hardware and software that allows a PC to recognize and adapt to hardware changes with little or no intervention by the user. In a Plug and Play PC, some hardware enumeration tasks are performed by the operating system rather than the BIOS boot code.
To allow hardware enumeration to be moved from the BIOS boot code to the operating system, Microsoft Corporation has published the Simple Boot Flag Specification. This specification defines a set of flags in CMOS memory (a type of volatile memory with a battery back-up so that it is essentially nonvolatile). One of the flags is used by the operating system to tell the BIOS whether the operating system is Plug and Play capable. If this flag is activated, the BIOS boot code does not enumerate certain devices that will be enumerated by the operating system. This eliminates the wasted boot time that would occur if the same devices were enumerated first by BIOS, and then again by the operating system. It also helps optimize the use of resources because, if BIOS enumerates a device, it can limit the capability of a Plug and Play operating system to reassign the resources.
The Simple Boot Flag Specification also provides a set of flags for reducing boot time by allowing the operating system to communicate boot failures to the BIOS boot code. This allows the BIOS to skip diagnostic tests if all hardware booted correctly on the previous boot. Even with the Simple Boot Flag Specification, however, there are still occasions on which a full boot process must be executed.
The xe2x80x9cOnNowxe2x80x9d initiative by Microsoft Corporation is a comprehensive system-wide approach to system and device configuration and power management. One product of the OnNow initiative is the Advanced Configuration and Power Interface (ACPI) specification, version 1.0. The ACPI specification defines different system power states or xe2x80x9csleepxe2x80x9d states (S1-S5) in terms of motherboard/CPU/core logic characteristics. ACPI also defines power states (D1-D3) for individual devices in the system. By defining different power states, ACPI allows a PC to power down only partially, thereby eliminating the need to completely reboot and enumerate hardware depending on how xe2x80x9cdeepxe2x80x9d the sleep state.
The ACPI specification has also contributed to the evolution of the Plug and Play specification by defining a system board and BIOS interface that extends the Plug and Play data to provide power management and new configuration capabilities under centralized control of the operating system. Even with ACPI, however, there are still occasions when the system needs to be booted when no previous machine state has been preserved.
In conjunction with the Simple Boot Flag Specification, ACPI, OnNow, etc., it has been suggested that the following boot operations be eliminated so as to reduce boot time: video memory test; serial and parallel port tests; floppy disk test; and tests for hard disk controller or drive type. However, by eliminating these tests, there is a risk that errors associated with these devices will interfere with the operation of the system.
In one aspect of the present invention, system firmware enumerates hardware only if the hardware has been changed. In another aspect of the preset invention, two or more firmware boot tasks are performed simultaneously while the system is booting. Other embodiments are described and claimed.